#include "shape.h"

#include "draw.h"

Rectangle::Rectangle(Drawing *dp, int x1, int y1, int x2, int y2) : _dp(dp), _x1(x1), _y1(y1), _x2(x2), _y2(y2) {
}

void Rectangle::draw() {
    _dp->drawLine(_x1, _y1, _x2, _y1);
    _dp->drawLine(_x1, _y1, _x1, _y2);
    _dp->drawLine(_x2, _y1, _x2, _y2);
    _dp->drawLine(_x1, _y2, _x2, _y2);
}

Circle::Circle(Drawing *dp, int x, int y, int r) : _dp(dp), _x(x), _y(y), _r(r) {
}
void Circle::draw() {
    _dp->drawCircle(_x, _y, _r);
}